Full source code website bán hàng thương mại điện tử gần giống shopee
468.868 lượt xem;
1 <?
2 echo $_SESSION["session_message"];
3 $_SESSION["session_message"] = "";
4 $MAXPAGE=20;
5 ?>
6 <table height="28" cellSpacing="0" cellPadding="0" width="100%" border="0">
7 <tr align=center>
8 <td class="title" width="100%">Tuyển dụng :
9 </td>
10 </tr>
11 </table>
12 <?
13 switch ($_GET['action'])
14 {
15 case 'del' :
16 $id = $_GET['id'];
17 $pro=GetJobInfo($id);
18 if ($pro)
19 {
20 $sql = "delete from job where id='".$id."'";
21 $result = mysql_query($sql,$con);
22 if ($result)
23 {
24 if (file_exists("../".$pro['image'])) unlink("../".$pro['image']);
25 if (file_exists("../".$pro['image_large'])) unlink("../".$pro['image_large']);
26
27 echo "<p align=center class='err'>Đã xóa thành công</p>";
28 }
29 else echo "<p align=center class='err'>Không thể xóa dữ liệu</p>";
30 }
31 break;
32 }
33 ?>
34
35 <?
36 if (isset($_POST['ButDel'])) {
37 $cnt=0;
38 foreach ($_POST['chk'] as $id)
39 {
40 $pro=GetJobInfo($id);
41 if ($pro)
42 {
43 @$result = mysql_query("delete from avd where id='".$id."'",$con);
44 if ($result) {
45 $cnt++;
46 if (file_exists("../".$pro['image'])) unlink("../".$pro['image']);
47 if (file_exists("../".$pro['image_large'])) unlink("../".$pro['image_large']);
48
49 }
50 }
51 }
52 echo "<p align=center class='err'>Đã xóa ".$cnt." phần tử</p>";
53 }
54 if (isset($_POST['ButGood'])) {
55 $cnt=0;
56 foreach ($_POST['chk'] as $id)
57 {
58 $pro=GetProductInfo($id);
59 if ($pro)
60 {
61 if (CountRecord("pro_good","products_id=".$pro['products_id'])<=0)
62 {
63 $result = mysql_query("insert into pro_good (products_id,language,pro_dateadded) values ('".$pro['products_id']."','".$pro['language']."',SYSDATE())",$con);
64 if ($result) {
65 $cnt++;
66 }
67 }
68 }
69 }
70 echo "<p align=center class='err'>Đã cập nhật ".$cnt." phần tử</p>";
71 }
72 if (isset($_POST['ButNew'])) {
73 $cnt=0;
74 foreach ($_POST['chk'] as $id)
75 {
76 $pro=GetProductInfo($id);
77 if ($pro)
78 {
79 if (CountRecord("pro_new","products_id=".$pro['products_id'])<=0)
80 {
81 $result = mysql_query("insert into pro_new (products_id,language,pro_dateadded) values ('".$pro['products_id']."','".$pro['language']."',SYSDATE())",$con);
82 if ($result) {
83 $cnt++;
84 }
85 }
86 }
87 }
88 echo "<p align=center class='err'>Đã cập nhật ".$cnt." phần tử</p>";
89 }
90 if (isset($_POST['ButSaleoff'])) {
91 $cnt=0;
92 foreach ($_POST['chk'] as $id)
93 {
94 $pro=GetProductInfo($id);
95 if ($pro)
96 {
97 if (CountRecord("pro_saleoff","products_id=".$pro['products_id'])<=0)
98 {
99 $result = mysql_query("insert into pro_saleoff (products_id,language,pro_dateadded) values ('".$pro['products_id']."','".$pro['language']."',SYSDATE())",$con);
100 if ($result) {
101 $cnt++;
102 }
103 }
104 }
105 }
106 echo "<p align=center class='err'>Đã cập nhật ".$cnt." phần tử</p>";
107 }
108
109 if (isset($_POST['trogia'])) {
110 $cnt=0;
111 foreach ($_POST['chk'] as $id)
112 {
113 $pro=GetProductInfo($id);
114 if ($pro)
115 {
116 @$result = mysql_query("update products set trogia=1 where id='".$id."'",$con);
117 if ($result) {
118 $cnt++;
119
120 }
121 }
122 }
123 echo "<p align=center class='err'>Đã thêm ".$cnt." sản phẩm trợ giá</p>";
124 }
125
126 if (isset($_POST['huytrogia'])) {
127 $cnt=0;
128 foreach ($_POST['chk'] as $id)
129 {
130 $pro=GetProductInfo($id);
131 if ($pro)
132 {
133 @$result = mysql_query("update products set trogia=0 where id='".$id."'",$con);
134 if ($result) {
135 $cnt++;
136
137 }
138 }
139 }
140 echo "<p align=center class='err'>Đã hủy ".$cnt." sản phẩm trợ giá</p>";
141 }
142
143
144
145
146
147 ?>
148
149
150 <?
151 if (isset($_POST['vip'])) {
152 $cnt=0;
153 foreach ($_POST['chk'] as $id)
154 {
155
156 $sql_news=mysql_query("SELECT * FROM job where id='".$id."' ");
157 $news=mysql_fetch_assoc($sql_news);
158
159 if ($news)
160 {
161 @$result = mysql_query("update job set vip=1 where id='".$id."' ",$con);
162 if ($result) {
163 $cnt++;
164
165 }
166 }
167 }
168 echo "<p align=center class='err'>Đã thêm ".$cnt." vào rao vặt vip</p>";
169 }
170 ?>
171
172 <?
173 if (isset($_POST['un_vip'])) {
174 $cnt=0;
175 foreach ($_POST['chk'] as $id)
176 {
177
178 $sql_news=mysql_query("SELECT * FROM job where id='".$id."' ");
179 $news=mysql_fetch_assoc($sql_news);
180
181 if ($news)
182 {
183 @$result = mysql_query("update job set vip=0 where id='".$id."' ",$con);
184 if ($result) {
185 $cnt++;
186
187 }
188 }
189 }
190 echo "<p align=center class='err'>Đã hủy ".$cnt." tin rao vặt vip</p>";
191 }
192 ?>
193
194 <?
195 $page = $_GET["page"];
196 $p=0;
197 if ($page!='') $p=$page;
198 $where="1=1";
199 //if ($_REQUEST['status']!='') $where="products_status=".$_REQUEST['status']." ";
200 if ($_REQUEST['cat']!='') $where="job_cat=".$_REQUEST['cat'];
201 ?>
202 <?
203 function taotrang($total,$link,$nitem,$itemcurrent,$step=10)
204 { global $con;
205 $ret="";
206
207 $param="";
208 $pages=count_page($total,$nitem);
209 if ($itemcurrent>0) $ret.='<a title="Đầu tiên" href="'.$link.'0" class="lslink">[<]</a> ';
210 if ($itemcurrent>1) $ret.='<a title="Về trước" href="'.$link.($itemcurrent-1).'" class="lslink">[<<]</a> ';
211 $from=($itemcurrent-$step>0?$itemcurrent-$step:0);
212 $to=($itemcurrent+$step<$pages?$itemcurrent+$step:$pages);
213 for ($i=$from;$i<$to;$i++)
214 {
215 if ($i!=$itemcurrent) $ret.='<a href="'.$link.$i.'" class="lslink">'.($i+1).'</a> ';
216 else $ret.='<b>'.($i+1).'</b> ';
217 }
218 if (($itemcurrent<$pages-2) && ($pages>1)) $ret.='<a title="Tiếp theo" href="'.$link.($itemcurrent+1).'">[>>]</a> ';
219 if ($itemcurrent<$pages-1) $ret.='<a title="Cuối cùng" href="'.$link.($pages-1).'">[>]</a>';
220 return $ret;
221 }
222
223 $pageindex=taotrang(CountRecord("job",$where),"./?act=job&cat=".$_REQUEST['cat']."&page=",$MAXPAGE,$page);
224 ?>
225
226 <table cellspacing="0" cellpadding="0" width="100%">
227 <? if ($_REQUEST['code']==1) echo '<tr><td colspan="2" align="center" class="err">Đã cập nhật thành công</td></tr>'; ?>
228 <tr>
229 <td class="smallfont">Trang : <? echo $pageindex; ?></td>
230 <td height="30" align="right" class="smallfont">
231 <select size="1" name="ddCat" class="smallfont">
232 <?
233 $ms=GetListJob(0);
234 echo '<option value="">[Tất cả]</option>';
235 foreach ($ms as $m)
236 if ($m[0]!=$_REQUEST['cat'])
237 echo '<option value="'.$m[0].'">'.$m[1].'</option>';
238 else
239 echo '<option selected value="'.$m[0].'">'.$m[1].'</option>';
240 ?>
241 </select>
242 <input type="button" value="Chuyển" class="button" onclick="window.location='./?act=job&cat='+ddCat.value">
243 </td>
244 </tr>
245 </table>
246 </td>
247 </tr>
248 </table>
249 <table cellspacing="0" cellpadding="0">
250 <tr>
251 <td class="smallfont">Tìm kiếm: </td>
252 <td class="smallfont">
253 <!-- begin tim kiem-->
254 <form name="form_select" method="GET" action="./">
255 <table id="timkiem_home" border="0" id="table21" cellspacing="0" cellpadding="0">
256 <tr>
257 <td style="padding-left:4px;">
258 <select size="1" name="cat_id">
259 <?
260 $ms=GetListJob(0);
261 echo '<option value="">[Tất cả]</option>';
262 foreach ($ms as $m)
263 if ($m[0]!=$_REQUEST['cat'])
264 echo '<option value="'.$m[0].'">'.$m[1].'</option>';
265 else
266 echo '<option selected value="'.$m[0].'">'.$m[1].'</option>';
267 ?>
268 </select>
269 </td>
270 <td style="padding-left:0px">
271 <input name="keywords" type="text" id="input_timkiem" value="">
272 </td>
273 <td>
274 <input type="hidden" name="act" value="search_job">
275 <input type="hidden" name="job" value="search_job">
276 <input id="button_search" type="submit" name="search" value="Tìm">
277 </td>
278 </tr>
279 </table>
280 </form>
281 <!-- end tim kiem -->
282 </td>
283 </tr>
284 </table>
285 <form method="POST" name="frmList" action="index.php">
286 <input type=hidden name="page" value="<? echo $page; ?>">
287 <table border="1" cellpadding="2" style="border-collapse: collapse" bordercolor="#C9C9C9" width="100%" id="AutoNumber1">
288 <tr>
289 <td align=center nowrap class="title"><input type="checkbox" name="chkall" onclick="chkallClick(this);"></td>
290 <td colspan="2" nowrap class="title"> </td>
291 <td align="center" nowrap class="title"><b>ID</b></td>
292 <td align="center" nowrap class="title"><b>Tên </b></td>
293 <td align="center" nowrap class="title"><b>Người đăng</b></td>
294 <td align="center" nowrap class="title"><b>Danh mục hệ thống</b></td>
295 <td align="center" nowrap class="title"><b>Nơi đăng</b></td>
296 <td align="center" nowrap class="title"><b>Ngày đăng</b></td>
297
298 </tr>
299
300 <?php
301 $sql="select * from job where $where order by id DESC limit ".($p*$MAXPAGE).",".$MAXPAGE;
302 $result=mysql_query($sql,$con);
303 $i=0;
304 while(($row=mysql_fetch_array($result)))
305 {
306 $i++;
307 if ($i%2) $color="#d5d5d5"; else $color="#e5e5e5";
308 $catinfo=GetCatJobInfo($row['job_cat']);
309 $cityinfo=GetCityInfo($row['city']);
310 ?>
311
312 <tr>
313 <td align="center" bgcolor="<? echo $color; ?>" class="smallfont">
314 <input type="checkbox" name="chk[]" value="<? echo $row['id']; ?>"></td>
315 <td align="center" bgcolor="<? echo $color; ?>" class="smallfont">
316 <a href="./?act=job_m&cat=<? echo $_REQUEST['cat']; ?>&status=<? echo $_REQUEST['status']; ?>&id=<? echo $row['id']; ?>&page=<? echo $page?>">Sửa</a></td>
317 <td align="center" bgcolor="<? echo $color; ?>" class="smallfont">
318 <a onclick="return confirm('Bạn có chắc chắn muốn xoá ?');" href="./?act=job&action=del&cat=<? echo $_REQUEST['cat']; ?>&status=<? echo $_REQUEST['status']; ?>&id=<? echo $row['id']; ?>">Xoá</a></td>
319 <td bgcolor="<? echo $color; ?>" align="left" align="left" class="smallfont"><? echo $row['id']; ?> </td>
320 <td bgcolor="<? echo $color; ?>" class="smallfont"><a href="../?home=job&act=views&id=<? echo $row['id']; ?>" target="_blank"><? echo $row['name']; ?></a></td>
321 <td bgcolor="<? echo $color; ?>" class="smallfont"><? echo $row['user']; ?> </td>
322 <td bgcolor="<? echo $color; ?>" class="smallfont"><? echo $catinfo['name']; ?> </td>
323 <td bgcolor="<? echo $color; ?>" class="smallfont"><?if($row['city']=='0'){?>TOÀN QUỐC<?}else{?><? echo $cityinfo['name']; ?><?}?> </td>
324 <td bgcolor="<? echo $color; ?>" class="smallfont"><? echo $row['date']; ?> </td>
325
326 </tr>
327 <?
328 }
329 ?>
330 </table>
331 <input type="hidden" name="act" value="job"><table border="0" width="100%" cellspacing="0" cellpadding="0" id="table1">
332 <tr>
333 <td>
334 <input type="submit" value="Xóa Chọn" name="ButDel" onclick="return confirm('Bạn có chắc chắn muốn xoá ?');" class="button"></td>
335 <td align="right">
336 </td>
337 <td align="right">
338 <input type="submit" value="Chọn là Vip" name="vip" class="button">
339 <input type="submit" value="Hủy tin Vip" name="un_vip" class="button">
340 </td>
341
342
343 </tr>
344 </table>
345 </form>
346 <script language="JavaScript">
347 function chkallClick(o) {
348 var form = document.frmList;
349 for (var i = 0; i < form.elements.length; i++) {
350 if (form.elements[i].type == "checkbox" && form.elements[i].name!="chkall") {
351 form.elements[i].checked = document.frmList.chkall.checked;
352 }
353 }
354 }
355 </script>
2 echo $_SESSION["session_message"];
3 $_SESSION["session_message"] = "";
4 $MAXPAGE=20;
5 ?>
6 <table height="28" cellSpacing="0" cellPadding="0" width="100%" border="0">
7 <tr align=center>
8 <td class="title" width="100%">Tuyển dụng :
9 </td>
10 </tr>
11 </table>
12 <?
13 switch ($_GET['action'])
14 {
15 case 'del' :
16 $id = $_GET['id'];
17 $pro=GetJobInfo($id);
18 if ($pro)
19 {
20 $sql = "delete from job where id='".$id."'";
21 $result = mysql_query($sql,$con);
22 if ($result)
23 {
24 if (file_exists("../".$pro['image'])) unlink("../".$pro['image']);
25 if (file_exists("../".$pro['image_large'])) unlink("../".$pro['image_large']);
26
27 echo "<p align=center class='err'>Đã xóa thành công</p>";
28 }
29 else echo "<p align=center class='err'>Không thể xóa dữ liệu</p>";
30 }
31 break;
32 }
33 ?>
34
35 <?
36 if (isset($_POST['ButDel'])) {
37 $cnt=0;
38 foreach ($_POST['chk'] as $id)
39 {
40 $pro=GetJobInfo($id);
41 if ($pro)
42 {
43 @$result = mysql_query("delete from avd where id='".$id."'",$con);
44 if ($result) {
45 $cnt++;
46 if (file_exists("../".$pro['image'])) unlink("../".$pro['image']);
47 if (file_exists("../".$pro['image_large'])) unlink("../".$pro['image_large']);
48
49 }
50 }
51 }
52 echo "<p align=center class='err'>Đã xóa ".$cnt." phần tử</p>";
53 }
54 if (isset($_POST['ButGood'])) {
55 $cnt=0;
56 foreach ($_POST['chk'] as $id)
57 {
58 $pro=GetProductInfo($id);
59 if ($pro)
60 {
61 if (CountRecord("pro_good","products_id=".$pro['products_id'])<=0)
62 {
63 $result = mysql_query("insert into pro_good (products_id,language,pro_dateadded) values ('".$pro['products_id']."','".$pro['language']."',SYSDATE())",$con);
64 if ($result) {
65 $cnt++;
66 }
67 }
68 }
69 }
70 echo "<p align=center class='err'>Đã cập nhật ".$cnt." phần tử</p>";
71 }
72 if (isset($_POST['ButNew'])) {
73 $cnt=0;
74 foreach ($_POST['chk'] as $id)
75 {
76 $pro=GetProductInfo($id);
77 if ($pro)
78 {
79 if (CountRecord("pro_new","products_id=".$pro['products_id'])<=0)
80 {
81 $result = mysql_query("insert into pro_new (products_id,language,pro_dateadded) values ('".$pro['products_id']."','".$pro['language']."',SYSDATE())",$con);
82 if ($result) {
83 $cnt++;
84 }
85 }
86 }
87 }
88 echo "<p align=center class='err'>Đã cập nhật ".$cnt." phần tử</p>";
89 }
90 if (isset($_POST['ButSaleoff'])) {
91 $cnt=0;
92 foreach ($_POST['chk'] as $id)
93 {
94 $pro=GetProductInfo($id);
95 if ($pro)
96 {
97 if (CountRecord("pro_saleoff","products_id=".$pro['products_id'])<=0)
98 {
99 $result = mysql_query("insert into pro_saleoff (products_id,language,pro_dateadded) values ('".$pro['products_id']."','".$pro['language']."',SYSDATE())",$con);
100 if ($result) {
101 $cnt++;
102 }
103 }
104 }
105 }
106 echo "<p align=center class='err'>Đã cập nhật ".$cnt." phần tử</p>";
107 }
108
109 if (isset($_POST['trogia'])) {
110 $cnt=0;
111 foreach ($_POST['chk'] as $id)
112 {
113 $pro=GetProductInfo($id);
114 if ($pro)
115 {
116 @$result = mysql_query("update products set trogia=1 where id='".$id."'",$con);
117 if ($result) {
118 $cnt++;
119
120 }
121 }
122 }
123 echo "<p align=center class='err'>Đã thêm ".$cnt." sản phẩm trợ giá</p>";
124 }
125
126 if (isset($_POST['huytrogia'])) {
127 $cnt=0;
128 foreach ($_POST['chk'] as $id)
129 {
130 $pro=GetProductInfo($id);
131 if ($pro)
132 {
133 @$result = mysql_query("update products set trogia=0 where id='".$id."'",$con);
134 if ($result) {
135 $cnt++;
136
137 }
138 }
139 }
140 echo "<p align=center class='err'>Đã hủy ".$cnt." sản phẩm trợ giá</p>";
141 }
142
143
144
145
146
147 ?>
148
149
150 <?
151 if (isset($_POST['vip'])) {
152 $cnt=0;
153 foreach ($_POST['chk'] as $id)
154 {
155
156 $sql_news=mysql_query("SELECT * FROM job where id='".$id."' ");
157 $news=mysql_fetch_assoc($sql_news);
158
159 if ($news)
160 {
161 @$result = mysql_query("update job set vip=1 where id='".$id."' ",$con);
162 if ($result) {
163 $cnt++;
164
165 }
166 }
167 }
168 echo "<p align=center class='err'>Đã thêm ".$cnt." vào rao vặt vip</p>";
169 }
170 ?>
171
172 <?
173 if (isset($_POST['un_vip'])) {
174 $cnt=0;
175 foreach ($_POST['chk'] as $id)
176 {
177
178 $sql_news=mysql_query("SELECT * FROM job where id='".$id."' ");
179 $news=mysql_fetch_assoc($sql_news);
180
181 if ($news)
182 {
183 @$result = mysql_query("update job set vip=0 where id='".$id."' ",$con);
184 if ($result) {
185 $cnt++;
186
187 }
188 }
189 }
190 echo "<p align=center class='err'>Đã hủy ".$cnt." tin rao vặt vip</p>";
191 }
192 ?>
193
194 <?
195 $page = $_GET["page"];
196 $p=0;
197 if ($page!='') $p=$page;
198 $where="1=1";
199 //if ($_REQUEST['status']!='') $where="products_status=".$_REQUEST['status']." ";
200 if ($_REQUEST['cat']!='') $where="job_cat=".$_REQUEST['cat'];
201 ?>
202 <?
203 function taotrang($total,$link,$nitem,$itemcurrent,$step=10)
204 { global $con;
205 $ret="";
206
207 $param="";
208 $pages=count_page($total,$nitem);
209 if ($itemcurrent>0) $ret.='<a title="Đầu tiên" href="'.$link.'0" class="lslink">[<]</a> ';
210 if ($itemcurrent>1) $ret.='<a title="Về trước" href="'.$link.($itemcurrent-1).'" class="lslink">[<<]</a> ';
211 $from=($itemcurrent-$step>0?$itemcurrent-$step:0);
212 $to=($itemcurrent+$step<$pages?$itemcurrent+$step:$pages);
213 for ($i=$from;$i<$to;$i++)
214 {
215 if ($i!=$itemcurrent) $ret.='<a href="'.$link.$i.'" class="lslink">'.($i+1).'</a> ';
216 else $ret.='<b>'.($i+1).'</b> ';
217 }
218 if (($itemcurrent<$pages-2) && ($pages>1)) $ret.='<a title="Tiếp theo" href="'.$link.($itemcurrent+1).'">[>>]</a> ';
219 if ($itemcurrent<$pages-1) $ret.='<a title="Cuối cùng" href="'.$link.($pages-1).'">[>]</a>';
220 return $ret;
221 }
222
223 $pageindex=taotrang(CountRecord("job",$where),"./?act=job&cat=".$_REQUEST['cat']."&page=",$MAXPAGE,$page);
224 ?>
225
226 <table cellspacing="0" cellpadding="0" width="100%">
227 <? if ($_REQUEST['code']==1) echo '<tr><td colspan="2" align="center" class="err">Đã cập nhật thành công</td></tr>'; ?>
228 <tr>
229 <td class="smallfont">Trang : <? echo $pageindex; ?></td>
230 <td height="30" align="right" class="smallfont">
231 <select size="1" name="ddCat" class="smallfont">
232 <?
233 $ms=GetListJob(0);
234 echo '<option value="">[Tất cả]</option>';
235 foreach ($ms as $m)
236 if ($m[0]!=$_REQUEST['cat'])
237 echo '<option value="'.$m[0].'">'.$m[1].'</option>';
238 else
239 echo '<option selected value="'.$m[0].'">'.$m[1].'</option>';
240 ?>
241 </select>
242 <input type="button" value="Chuyển" class="button" onclick="window.location='./?act=job&cat='+ddCat.value">
243 </td>
244 </tr>
245 </table>
246 </td>
247 </tr>
248 </table>
249 <table cellspacing="0" cellpadding="0">
250 <tr>
251 <td class="smallfont">Tìm kiếm: </td>
252 <td class="smallfont">
253 <!-- begin tim kiem-->
254 <form name="form_select" method="GET" action="./">
255 <table id="timkiem_home" border="0" id="table21" cellspacing="0" cellpadding="0">
256 <tr>
257 <td style="padding-left:4px;">
258 <select size="1" name="cat_id">
259 <?
260 $ms=GetListJob(0);
261 echo '<option value="">[Tất cả]</option>';
262 foreach ($ms as $m)
263 if ($m[0]!=$_REQUEST['cat'])
264 echo '<option value="'.$m[0].'">'.$m[1].'</option>';
265 else
266 echo '<option selected value="'.$m[0].'">'.$m[1].'</option>';
267 ?>
268 </select>
269 </td>
270 <td style="padding-left:0px">
271 <input name="keywords" type="text" id="input_timkiem" value="">
272 </td>
273 <td>
274 <input type="hidden" name="act" value="search_job">
275 <input type="hidden" name="job" value="search_job">
276 <input id="button_search" type="submit" name="search" value="Tìm">
277 </td>
278 </tr>
279 </table>
280 </form>
281 <!-- end tim kiem -->
282 </td>
283 </tr>
284 </table>
285 <form method="POST" name="frmList" action="index.php">
286 <input type=hidden name="page" value="<? echo $page; ?>">
287 <table border="1" cellpadding="2" style="border-collapse: collapse" bordercolor="#C9C9C9" width="100%" id="AutoNumber1">
288 <tr>
289 <td align=center nowrap class="title"><input type="checkbox" name="chkall" onclick="chkallClick(this);"></td>
290 <td colspan="2" nowrap class="title"> </td>
291 <td align="center" nowrap class="title"><b>ID</b></td>
292 <td align="center" nowrap class="title"><b>Tên </b></td>
293 <td align="center" nowrap class="title"><b>Người đăng</b></td>
294 <td align="center" nowrap class="title"><b>Danh mục hệ thống</b></td>
295 <td align="center" nowrap class="title"><b>Nơi đăng</b></td>
296 <td align="center" nowrap class="title"><b>Ngày đăng</b></td>
297
298 </tr>
299
300 <?php
301 $sql="select * from job where $where order by id DESC limit ".($p*$MAXPAGE).",".$MAXPAGE;
302 $result=mysql_query($sql,$con);
303 $i=0;
304 while(($row=mysql_fetch_array($result)))
305 {
306 $i++;
307 if ($i%2) $color="#d5d5d5"; else $color="#e5e5e5";
308 $catinfo=GetCatJobInfo($row['job_cat']);
309 $cityinfo=GetCityInfo($row['city']);
310 ?>
311
312 <tr>
313 <td align="center" bgcolor="<? echo $color; ?>" class="smallfont">
314 <input type="checkbox" name="chk[]" value="<? echo $row['id']; ?>"></td>
315 <td align="center" bgcolor="<? echo $color; ?>" class="smallfont">
316 <a href="./?act=job_m&cat=<? echo $_REQUEST['cat']; ?>&status=<? echo $_REQUEST['status']; ?>&id=<? echo $row['id']; ?>&page=<? echo $page?>">Sửa</a></td>
317 <td align="center" bgcolor="<? echo $color; ?>" class="smallfont">
318 <a onclick="return confirm('Bạn có chắc chắn muốn xoá ?');" href="./?act=job&action=del&cat=<? echo $_REQUEST['cat']; ?>&status=<? echo $_REQUEST['status']; ?>&id=<? echo $row['id']; ?>">Xoá</a></td>
319 <td bgcolor="<? echo $color; ?>" align="left" align="left" class="smallfont"><? echo $row['id']; ?> </td>
320 <td bgcolor="<? echo $color; ?>" class="smallfont"><a href="../?home=job&act=views&id=<? echo $row['id']; ?>" target="_blank"><? echo $row['name']; ?></a></td>
321 <td bgcolor="<? echo $color; ?>" class="smallfont"><? echo $row['user']; ?> </td>
322 <td bgcolor="<? echo $color; ?>" class="smallfont"><? echo $catinfo['name']; ?> </td>
323 <td bgcolor="<? echo $color; ?>" class="smallfont"><?if($row['city']=='0'){?>TOÀN QUỐC<?}else{?><? echo $cityinfo['name']; ?><?}?> </td>
324 <td bgcolor="<? echo $color; ?>" class="smallfont"><? echo $row['date']; ?> </td>
325
326 </tr>
327 <?
328 }
329 ?>
330 </table>
331 <input type="hidden" name="act" value="job"><table border="0" width="100%" cellspacing="0" cellpadding="0" id="table1">
332 <tr>
333 <td>
334 <input type="submit" value="Xóa Chọn" name="ButDel" onclick="return confirm('Bạn có chắc chắn muốn xoá ?');" class="button"></td>
335 <td align="right">
336 </td>
337 <td align="right">
338 <input type="submit" value="Chọn là Vip" name="vip" class="button">
339 <input type="submit" value="Hủy tin Vip" name="un_vip" class="button">
340 </td>
341
342
343 </tr>
344 </table>
345 </form>
346 <script language="JavaScript">
347 function chkallClick(o) {
348 var form = document.frmList;
349 for (var i = 0; i < form.elements.length; i++) {
350 if (form.elements[i].type == "checkbox" && form.elements[i].name!="chkall") {
351 form.elements[i].checked = document.frmList.chkall.checked;
352 }
353 }
354 }
355 </script>